const logger = require('log4js').getLogger()
const Wechat = require('../util/Wechat')

exports.push = content => {
	require('./alertoverMng').push({
		content
	}).then(result => {
		//logger.debug('[' + __filename + ':' + __line + ']', result)
	}, result => {
		logger.error('[' + __filename + ':' + __line + ']', result)
	})

	Wechat({
		AppID: 'wx226c3c9557c44304',
		AppSecret: '8bff6155d050947d06bf7802e69f4acb'
	}).messageCustomSend({
		touser: 'oh6S-uAsGjRK-JkfeD0bIeuKV0_0',
		msgtype: 'text',
		content
	}).then(result => {
		if (result.errcode)
			logger.error('[' + __filename + ':' + __line + ']', result)
	}, result => {
		logger.error('[' + __filename + ':' + __line + ']', JSON.stringify(result))
	})
}